package tech.heptagram.staff.cas.controller.view;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import javax.annotation.Resource;

import tech.heptagram.core.common.rest.ResponseResult;
import tech.heptagram.staff.cas.domain.Area;
import tech.heptagram.staff.cas.service.staff.CasAreaService;

@RestController
@RequestMapping("/api/view/sys/area")
public class CasAreaViewApiController {
    @Resource
    private CasAreaService casAreaService;

    @GetMapping("allcities")
    public ResponseResult<List<Area>> findAllCity() {
        List<Area> areas = casAreaService.findAllCity();
        return new ResponseResult<>(areas);
    }
}
